/**
 * 
 */
package com.jrh.dal;

import java.util.List;
import java.util.Map;

import com.jrh.domain.common.Page;
import com.jrh.domain.entity.SiteMsg;

/**
 * 类SiteMsgDao.java的实现描述：站内短信息DAO层
 * 
 * @author mmyjse@gmail.com 2012-8-11 上午11:20:08
 */
public class SiteMsgDao extends BaseDao<SiteMsg> {

    {
        namespace = "jrh.single.siteMsg";
    }

    @SuppressWarnings("unchecked")
    public Page<SiteMsg> findAllSiteMsg(String loginId, Integer start, Integer pageSize) {
        Map<String, Object> map = this.getPageMap(start, pageSize);
        map.put("loginId", loginId);
        List<SiteMsg> list = (List<SiteMsg>) sqlMapClientTemplate.queryForList(namespace + ".findAllSiteMsg", map);
        Integer count = (Integer) sqlMapClientTemplate.queryForObject(namespace + "." + "findAllSiteMsg_count", map);
        return new Page<SiteMsg>(list, start, pageSize, count);
    }

}
